
<html>
<head>
<title>REPORT VIEW COMPONENT</title>
<!--meta http-equiv="X-UA-Compatible" content="IE=edge"-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="Stylesheet" type="text/css" href="../theme/css/style_reset.css" />
<link rel="Stylesheet" type="text/css" href="../theme/css/comp_reportview.css" />
<script type="text/JavaScript" src="../api/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="../api/js/jquery-ui-1.10.3.custom.min.js"></script>
<script type='text/JavaScript' src='../../zbw_reporting/scripts/framework_include.js'></script>
<!-- [REQUIRED] SCRIPT FOR INTEGRATION WITH BOI -->

</head>
<body>
<!--OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
           codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
            WIDTH="100%" HEIGHT="100%" id="test">
            <PARAM NAME=FlashVars VALUE="">
            <PARAM NAME="movie" VALUE="/sap/bc/bsp/sap/YBO_MIS/mother.swf">
            <param name="wmode" value="opaque" />
            <PARAM NAME="quality" VALUE="high">
            <PARAM NAME="bgcolor" VALUE="#FFFFFF">
            <PARAM NAME="play" VALUE="true">
            <PARAM NAME="loop" VALUE="true">
            <PARAM NAME=bgcolor VALUE="#FFFFFF">
            <EMBED src="/sap/bc/bsp/sap/YBO_MIS/mother.swf" quality=high bgcolor=#FFFFFF WIDTH="100%" HEIGHT="100%"
            NAME="test" ALIGN="" TYPE="application/x-shockwave-flash"
            play="true" loop="true"
            FlashVars=""
            PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
            </EMBED>
            </OBJECT-->

  <script type='text/JavaScript' >
  $(function(){
    var swfEl = getSwf("test");
    $('body').append(swfEl);
  });

  function getSwf(report)
    {
        /*var swfTemplate = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
            ' codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+
            ' WIDTH="100%" HEIGHT="100%" id="' + report + '"> '+
            ' <PARAM NAME=FlashVars VALUE="">'+
            ' <PARAM NAME="movie" VALUE="/sap/bc/bsp/sap/YBO_MIS/mother.swf"> '+
            ' <param name="wmode" value="opaque" /> ' +
            ' <PARAM NAME="quality" VALUE="high"> '+
            ' <PARAM NAME="bgcolor" VALUE="#FFFFFF"> '+
            ' <PARAM NAME="play" VALUE="true"> '+
            ' <PARAM NAME="loop" VALUE="true"> '+
            ' <PARAM NAME=bgcolor VALUE="#FFFFFF"> '+
            ' <EMBED src="/sap/bc/bsp/sap/YBO_MIS/mother.swf" quality=high bgcolor=#FFFFFF WIDTH="100%" HEIGHT="100%" '+
            ' NAME="' + report + '" ALIGN="" TYPE="application/x-shockwave-flash" '+
            ' play="true" loop="true" '+
            ' FlashVars="" '+
            ' PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> '+
            ' </EMBED>'+
            ' </OBJECT>';*/

         var swfTemplate =  '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
           ' codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+
            ' WIDTH="100%" HEIGHT="100%" id="' + report + '"> '+
           ' <PARAM NAME=FlashVars VALUE=""> '+
           ' <PARAM NAME="movie" VALUE="/sap/bc/bsp/sap/YBO_MIS/mother.swf"> '+
           ' <param name="wmode" value="opaque" /> '+
           ' <PARAM NAME="quality" VALUE="high"> '+
           ' <PARAM NAME="bgcolor" VALUE="#FFFFFF"> '+
           ' <PARAM NAME="play" VALUE="true"> '+
           ' <PARAM NAME="loop" VALUE="true"> '+
           ' <PARAM NAME=bgcolor VALUE="#FFFFFF"> '+
           ' <EMBED src="/sap/bc/bsp/sap/YBO_MIS/mother.swf" quality=high bgcolor=#FFFFFF WIDTH="100%" HEIGHT="100%" '+
           ' NAME="' + report + '" ALIGN="" TYPE="application/x-shockwave-flash" '+
           ' play="true" loop="true" '+
           ' FlashVars="" '+
           ' PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> '+
           ' </EMBED> '+
           ' </OBJECT>';

        return swfTemplate;
    }

    function setSWFIsReady(movieName) //Start Function
    {
        alert("setSWFIsReady");
        initMovieBindings(movieName);
    }
    function initMovieBindings(movieName) {
        var newTrue = true;
        getMovie(movieName).addDataSourceChangeEventListener("BL", "rangeChangeHandler", newTrue);
        getMovie(movieName).addDataSourceChangeEventListener("Total", "rangeChangeHandler", newTrue);
    }
    function rangeChangeHandler(movieName, rangeName) {
        var newValue = getMovie(movieName).getDataSource(rangeName);
         alert(newValue);
    }
    function getMovie(movieName) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
            return window[movieName];
        }
        else {
            return document[movieName];
        }
    }
</script>

</body>
</html>